function B=MagneticField3D_R_Func(r,z,theta,r_d,z_d)

nu0 =  4*pi*10^-7;
R=sqrt(r.^2+r_d.^2-2*r.*r_d.*cos(theta)+(z-z_d).^2);
Nom=(z_d-z).*cos(theta).*r;
Denom=R.^3;
Const=nu0/(4*pi);

B=Const*Nom./Denom;
